<!DOCTYPE html>
<html lang="ch-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 200px;
        height: 200px;
        background-color: pink;
        border: 20px solid red;
        padding: 15px;
        /* box-sizing: content-box;-----盒子大小为 width+padding+border (默认) */
        /* box-sizing: border-box-----盒子大小为width; */
        box-sizing: border-box;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>